<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <!-- 6、完成一个其它进制转换成十进制的函数(convert(‘123’,8):表示把8进制的123转成10进制) -->
   
    <script>
        function covert(num, s) {
            return parseInt(num,s)
        }
        console.log(covert(123,8));
    </script>
</body>

</html>